Skip to content

don't percent encoding the url#487

Merged
migueldeicaza merged 1 commit intomigueldeicaza:mainfrom
hanyang-tony:main
Mar 15, 2026
Merged

don't percent encoding the url#487
migueldeicaza merged 1 commit intomigueldeicaza:mainfrom
hanyang-tony:main

Conversation

@hanyang-tony
Copy link
Contributor

NSURL handles that itself, percent encoding whole url is not allowed.

from: https://developer.apple.com/documentation/foundation/nsstring/addingpercentencoding(withallowedcharacters:)

Entire URL strings cannot be percent-encoded, because each URL component specifies a different set of allowed characters.

Encoding the url with query character set will cause url anchor to be invalid. For example, https://github.com/migueldeicaza/SwiftTerm/blob/main/README.md?plain=1#L11 becomes https://github.com/migueldeicaza/SwiftTerm/blob/main/README.md?plain=1%23L11

NSURL handles that itself, percent encoding whole url is not allowed
@migueldeicaza
Copy link
Owner

Thank you!

@migueldeicaza migueldeicaza merged commit e282dbb into migueldeicaza:main Mar 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants